CC = gcc
CFLAGS = -Wall -Wextra -g
LDFLAGS = -lpthread
TARGET = app

SRCS = TcpQtServer.c TcpStmServer.c UdpServer.c
OBJS = $(SRCS:.c=.o)
DEPS = $(wildcard *.h)

all: $(TARGET)

$(TARGET): $(OBJS)
	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)

%.o: %.c $(DEPS)
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm -f $(OBJS) $(TARGET)

.PHONY: all clean